import { _decorator, Component, instantiate, IVec3, Node } from 'cc';
import { EntityTypeEnum, IActor, IBullet } from '../../Common';
import { EntityStateEnum, EventEnum } from '../../Enum';
import { EntityManager } from '../../Base/EntityManager';
import { ExplosionStateMachine } from './ExplosionStateMachine';
const { ccclass, property } = _decorator;

@ccclass('ExplosionManager')
export class ExplosionManager extends EntityManager {
   type:EntityTypeEnum;
   id: number;
       //初始化
      init(type:EntityTypeEnum,{x,y,z}:IVec3 ){
        this.node.setPosition(x,y,z);//设置位置
       this.type=type;
       this.fsm=this.addComponent(ExplosionStateMachine);
       this.fsm.init(type);   
       this.state=EntityStateEnum.Idle;

      }

}

